import { defineStore } from "pinia";
import { ref } from "vue";

export const useGlobalState = defineStore("globalState", {
  state: () => {
    const userInfo = ref({
      name: "张三",
      age: 18,
    });

    return {
      userInfo,
    };
  },
  actions: {
    changeUserInfo(userInfo: any) {
      this.userInfo = userInfo;
    },
  },
});